<template>
    <view>
        <pc-carousel :data="datalist" field="img" mode="single" @selection="selection"></pc-carousel>
    </view>
</template>

<script>
    export default {
        data(){
            return{
                datalist:[
                    {name:'图片1',img:'https://xnlv-test.lizxx.com/image/xnlv/static/yunzhanguan/Group907.png',title: '图片1标题'},
                    {name:'图片2',img:'https://xnlv-test.lizxx.com/image/xnlv/static/yunzhanguan/Group1503-1.png',title: '图片2标题'},
                    {name:'图片3',img:'https://xnlv-test.lizxx.com/image/xnlv/static/yunzhanguan/yunzhanguanFrame-13141.png',title: '图片3标题'},
                    {name:'图片4',img:'https://xnlv-test.lizxx.com/image/xnlv/static/gongyijiaoyu/image49839.png',title: '图片4标题'},
                    {name:'图片5',img:'https://xnlv-test.lizxx.com/image/xnlv/static/gongyijiaoyu/image49840.png',title: '图片5标题'},
                ]
            }
        },
        methods:{
            selection(e){
                console.log(e)
            },
			onImageIndex(index) {
			      console.log('当前图片索引：', index);
			    }
        }
    }
</script>

<style>
.image{
	width: 100%;
	height: 100%;
}
</style>
